home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / prog_bas / pbc32.zip / PBC$BAS.ZIP / RINSTR.BAS < prev    next >
BASIC Source File  |  1996-04-10  |  676b  |  21 lines

  1. '   +----------------------------------------------------------------------+
  2. '   |                                                                      |
  3. '   |   PBClone  (C) Copyright 1996 Charon Software, All Rights Reserved   |
  4. '   |                                                                      |
  5. '   +----------------------------------------------------------------------+
  6.  
  7.    DECLARE SUB Reverse (St$)
  8.  
  9. SUB RInstr (MainSt$, SubSt$, Posn%)
  10.    Main$ = MainSt$
  11.    Sub$ = SubSt$
  12.    Reverse Main$
  13.    Reverse Sub$
  14.    Tmp% = INSTR(Main$, Sub$)
  15.    IF Tmp% THEN
  16.       Posn% = LEN(Main$) - LEN(Sub$) - Tmp% + 2
  17.    ELSE
  18.       Posn% = 0
  19.    END IF
  20. END SUB
  21.